package com.example.tests;

import java.util.Random;

import com.example.utils.DateGenerator;

public class GeneratorBase {
	
	protected static String generateRandomString(){
		Random rnd = new Random();
		if(rnd.nextInt(3) == 0 ){
			return  "";
		} else{
			return "test" + rnd.nextInt();
		}
	}	
	
	protected static String generateEmailAddress() {
		return generateRandomString() + "@" + generateRandomString() + ".com";
	}
	
	protected static String generatePhone(DateGenerator dateData) {		
		return "+7 (" + dateData.generateRandomBetween(0, 999) + ") " +  
				+ dateData.generateRandomBetween(0, 999) + "-" 
				+ dateData.generateRandomBetween(0, 99) + "-" 
				+ dateData.generateRandomBetween(0, 99);
	}
	
}
